package com.niiwoo.civet.account.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 交易解冻情况枚举
 * Created by wangjichao on 2018/4/23.
 */
@AllArgsConstructor
@Getter
public enum TransUnfreezeDegreeEnum {
    NOT_UNFREEZE((byte)0,"未解冻"),
    PART_UNFREEZE((byte)1,"已部分解冻"),
    ALL_UNFREEZE((byte)2,"已全额解冻");

    private Byte value;
    private String desc;

    public static TransUnfreezeDegreeEnum enumOf(Byte value){
        for (TransUnfreezeDegreeEnum transUnfreezeDegreeEnum : values()) {
            if (transUnfreezeDegreeEnum.value.equals(value)) {
                return transUnfreezeDegreeEnum;
            }
        }
        throw new NoSuchEnumValueException("TransUnfreezeDegreeEnum:"+value);
    }
}
